@extends('admin::layouts.master')

@section('content')
    {{--<h1>Hello World</h1>--}}

    {{--<p>--}}
        {{--This view is loaded from module: {!! config('admin.name') !!}--}}
    {{--</p>--}}
    

    <div class="container">
        <div class="card">
            <div class="card-header">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active ">文章列表</li>&nbsp;&nbsp;&nbsp;&nbsp;
                </ul>
            </div>
            <div class="card-body">
                <table class="table">
                    <thead>
                    <tr>
                        <th style="left: 20px;">编号</th>
                        <th>文章标题</th>
                        <th>文章作者</th>
                        <th>点击数</th>
                        <th width="80">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($articledate as $v)
                        <tr>
                            <td scope="row">{{$v['id']}}</td>
                            <td>{{$v['title']}}</td>
                            <td>{{$v['author']}}</td>
                            <td>{{$v['click']}}</td>
                            <td>
                                <div class="btn-group" role="group" aria-label="Basic example" >
                                    <button type="button" class="btn btn-info">查看</button>

                                        <a href="{{route('article.edit',$v['id'])}}" class="btn btn-success">编辑</a>

                                    <form action="{{route('article.destroy',$v['id'])}}" method="post">
                                        @csrf
                                        @method('DELETE')
                                        <button type="submit" class="btn btn-danger">删除</button>
                                    </form>

                                </div>
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
            <div class="card-footer text-muted">

            </div>
        </div>
    </div>
@stop
